function h=def_draw_player_trace(G,P,k)
% def_draw_player_trace: Default subroutine to draw the player trace (trajectory)
%
% SYNTAX:
%   h = def_draw_player_trace(G,P,k)
%   Return handles of graphics objects to represent the player trace.
%   These graphics objects will be kept on the simulation screen 
%   so as to illustrate also previous trajectory of each player at each step.
%   You can draw some objects in the routine of drawing player itself
%   so as to clean them automatically in every simulation step.

%   Author: Hongbin Ma
%   Last updated: 2009-6-1 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

switch length(P.pos)
case 2
    %h=plot([P.last_pos(1),P.pos(1)],[P.last_pos(2),P.pos(2)],P.legend);
    h=plot(P.trace(:,1),P.trace(:,2),P.legend);
case 3
    h=plot3(P.trace(:,1),P.trace(:,2),P.trace(:,3),P.legend);
otherwise
    alert_error_pos(P.pos);
end;

